package pl.edu.pw.perg.compinfodb.command;

import org.springframework.richclient.command.ToggleCommand;

import pl.edu.pw.perg.compinfodb.datamodel.ISearchableTableModel;

public class SerachModeCommand extends ToggleCommand {

	private ISearchableTableModel searchableTableModel;
	
	public SerachModeCommand(ISearchableTableModel searchableTableModel){
		this.searchableTableModel = searchableTableModel;
		setDefaultButton();
	}
	
	@Override
	protected void onSelection() {
		searchableTableModel.switchToSearchMode(true);
		
		
	}
	
	@Override
	protected void onDeselection() {
		searchableTableModel.switchToSearchMode(false);

	}
}
